package org.mokusakura.domain.vo;

import org.mokusakura.domain.Order;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author MokuSakura
 */
public class SimpleOrder {
    List<SimpleLineItem> lineItemList;
    long id;

    public SimpleOrder(Order order) {
        lineItemList = order.getLineItems()
                .stream()
                .map(SimpleLineItem::new)
                .collect(Collectors.toList());
        id = order.getOrderId();
    }
}
